package com.yanqu.road.server.cmd.cross.group;

import com.yanqu.road.pb.rank.RankProto;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.command.Command;
import com.yanqu.road.server.manger.cross.CrossDataMgr;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.Protocol;
import io.netty.channel.ChannelHandlerContext;

@Cmd(code = Protocol.S_CROSS_GROUP_SYNC_UNION_RANK, desc = "跨服分组商会排行同步")
public class CrossGroupUnionRankListSyncCmd implements Command {

	@Override
	public void execute(ChannelHandlerContext ctx, YanQuMessage packet) throws Exception {
		if(null != packet.getBytes()) {
			RankProto.UnionRankListMsg reqMsg = RankProto.UnionRankListMsg.parseFrom(packet.getBytes());
			CrossDataMgr.crossGroupUnionRankListSync(reqMsg);
		}
	}
}
